package org.p2psimulator.entity.protocol.messages.chord;

import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.Message;
import org.p2psimulator.entity.behavior.BehaviorTypes;
import org.p2psimulator.entity.protocol.messages.MessageTypes;

/**
 * Enviada para sinalizar que um peer possui um determinado arquivo 
 * quando ele entra na rede
 * @author amorim
 *
 */
public class ChordFileOwner extends Message {

	Id fileKey;
	
	public Id getFileKey() {
		return fileKey;
	}

	public void setFileKey(Id fileKey) {
		this.fileKey = fileKey;
	}

	public ChordFileOwner(Id origin, Id destination, int transactionId,
			BehaviorTypes originBehavior) {
		super(origin, destination, transactionId, originBehavior);
	}

	@Override
	public MessageTypes getMessageType() {
		return MessageTypes.CHORD_FILEOWNER;
	}

	@Override
	public String getName() {
		return MessageTypes.CHORD_FILEOWNER.getName();
	}

}
